home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / HTC82.ZIP / HOWTO8_2.TXT
Encoding:
Text File  |  1996-05-18  |  23.4 KB  |  449 lines

  1.  
  2. HOW TO CRACK, by +ORC, A TUTORIAL
  3.  
  4. Lesson 8.2: How to crack Windows, a deeper approach 
  5.  
  6. ---------------------------------------------------------
  7.      SPECIAL NOTE: Please excuse the somehow "unshaven"
  8.      character of the windows lessons... I'm cracking the
  9.      newest Windows '95 applications right now, therefore
  10.      at times I had to add "on the fly" some corrections to
  11.      the older Windows 3.1 and Windows NT findings.
  12.                 "homines, dum docent, discunt".
  13. ---------------------------------------------------------
  14.  
  15. ->   1st THING TO REMEMBER
  16. If you thought that DOS was a mess, please notice that windows
  17. 3.1 is a ghastly chaos, and windows 95 a gruesome nightmare of
  18. ill-cooked spaghetti code. Old Basic "GOTO" abominations were
  19. quite elegant in comparison with this concoction... One thing is
  20. sure: This OS will not last... it's way too messy organised,
  21. impossible to consolidate, slow and neurotic (but I must warn
  22. you... I thought exactly the same things about DOS in 1981).
  23.   The most striking thing about windows 95 is that it is neither
  24. meat not fish: neither 16 nor 32... you could call it a "24 bit"
  25. operating system.
  26.   We'll never damage Microsoft interests enough to compensate for
  27. this moronic situation... where you have to wait three minutes
  28. to get on screen a wordprocessor that older OS (and even old DOS)
  29. kick up in 5 seconds. I decide therefore, hic et nunc, to add an
  30. ADDENDUM to this tutorial: Addendum 1 will be dedicated to teach
  31. everybody how to crack ALL Microsoft programs that do exist on
  32. this planet. I'll write it this sommer and give it away between
  33. the "allowed" lessons.
  34.   Anyway you can rely on good WINICE to crack everything, you'll
  35. find it on the web for free, I use version 1.95, cracked by [The
  36. Lexicon] (do not bother me for Warez, learn how to use the search
  37. engines on the web and fish them out yourself). Learn how to use
  38. this tool... read the whole manual! Resist the temptation to
  39. crack immediatly everything in sight... you 'll regret pretty
  40. soon that you did not wanted to learn how to use it properly.
  41. A little tip: as Winice is intended more for software developers
  42. than for crackers, we have to adapt it a little to our purposes,
  43. in order to make it even more effective: a good idea is to have
  44. in the *.DAT initialization file following lines:
  45.      INIT = "CODE ON; watchd es:di; watchd ds:si;"
  46.      TRA = 92
  47. This way you'll always have the hexadecimal notation on, two very
  48. useful watch windows for passwords deprotection and enough buffer
  49. for your traces.
  50.  
  51. WINDOWS 3.1. basic cracking: [ALGEBRAIC PROTECTIONS]
  52.      The most used windows protections are "registration codes",
  53. these must follow a special pattern: have a "-" or a "+" in a
  54. predetermined position, have a particular number in particular
  55. position... and so on.
  56. For the program [SHEZ], for instance, the pattern is to have a
  57. 14 bytes long alphanumeric sequence containing CDCE1357 in the
  58. first 8 bytes.
  59.      The second level of protection is to "connect" such a
  60. pattern to the alphanumeric contents of the NAME of the user...
  61. every user name will give a different "access key". This is the
  62. most commonly used system.
  63.      As most of these protections have a "-" inside the answering
  64. code, you do not need to go through the normal cracking procedure
  65. (described in the next lesson):
  66. *    load WINICE
  67. *    hwnd [name_of_the_crackanda_module]
  68. *    choose the window Handle of the snap, i.e, the exact
  69.      "FIELD" where the code number input arrives... say 091C(2)
  70. *    BMSG 091C WM_GETTEXT
  71. *    Run anew
  72. *    Look at the memory location(s)
  73. *    Do the same for the "Username" input FIELD. (Sometimes
  74.      linked, sometimes not, does not change much, though)
  75. *    BPR (eventually with TRACE) on the memory locations (these
  76.      will be most of the time FOUR: two NUMBERCODES and two
  77.      USERNAMES). The two "mirrored" ones are the most important
  78.      for your crack. At times there will be a "5th" location,
  79.      where the algebraic play will go on...
  80. *    Look at the code that performs algebraic manipulations on
  81.      these locations and understand what it does...
  82. *    Disable the routine or jump over it, or reverse it, or
  83.      defeat it with your own code... there are thousand
  84.      possibilities...
  85. *    Reassemble everything.
  86.  
  87. Uff... quite a long cracking work just to crack some miserable
  88. program... isn'there a quicker way? OF COURSE THERE IS! Actually
  89. there are quite a lot of them (see also the crack of Wincat Pro
  90. below): Look at the following code (taken from SNAP32, a screen
  91. capture utility for Windows 95, that uses a pretty recent
  92. protection scheme):
  93.  
  94.      XOR  EBX,EBX   ; make sure EBX is zeroed
  95.      MOV  BL, [ESI] ; load input char in BL
  96.      INC  ESI       ; point at the next character
  97.      MOV  EDI,EBX   ; save the input character in EDI
  98.      CMP  EBX,+2D   ; input char is a "-" ?
  99.      JZ   ok_it's_a_+_or_a_-
  100.      CMP  EBX,+2B   ; input char is a "+" ?
  101.      JNZ  Jesus_it's_neither_a_minus_nor_a_plus_let's_check_it
  102. :ok_it's_a_+_or_a_-
  103.      XOR  EBX,EBX   ; EBX is zeroed
  104.      MOV  BL,[ESI]  ; recharge BL
  105.      INC  ESI       ; point to next char (do not check - or +)
  106. :Jesus_it's_neither_a_minus_nor_a_plus_let's_check_it
  107.      XOR  EBP,EBP   ; zero EBP
  108.      CMP  DWORD PTR [boguschecker], +01
  109.      ...
  110.  
  111. even if you did not read all my precedent lessons, you do not
  112. need much more explications... this is a part of the algebraic
  113. check_procedure inside the SNAP32 module...  you could also get
  114. here through the usual
  115.      USER!BOZOSLIVEHERE
  116.      KERNEL!HMEMCPY
  117.      USER!GLOBALGETATOMNAME
  118. Windows wretched and detestable APIs used for copy protections,
  119. as usual with WINICE cracking, and as described elsewhere in my
  120. tutorial.
  121.   The above code is the part of the routine that checks for the
  122. presence of a "+" or a "-" inside the registration number (many
  123. protections scheme requires them at a given position, other need
  124. to jump over them).
  125.   Now sit down, make yourself comfortable and sip a good Martini-
  126. Wodka (invariably very useful in order to crack... but be aware
  127. that only Moskowskaia russian Wodka and a correct "Tumball" glass
  128. will do, do not forget the lemon)... what does this "-" stuff
  129. mean for us little crackers?
  130.   It means that we can search directly for the CMP EBX,+2B
  131. sequence inside any file protected with these schemes... and
  132. we'll land smack in the middle of the protection scheme! That's
  133. amazing... but you will never underrate enough the commercial
  134. programmers... the only really amazing thing is how simpleton the
  135. protectionists are! You don't believe me? Try it... you 'll get
  136. your crack at least 4 out of 5 times.
  137.   Yes I know, to find this code is not yet to crack it... but for
  138. this kind of copy protection (that's the reason it is so
  139. widespread) there is no single solution... each makes a slightly
  140. different algebraic manipulation of the alphanumeric and of the
  141. numeric data. It's up to you to crack the various schemes... here
  142. you can only learn how to find them and circumvene them. I'll not
  143. give you therefore a "debug" crack solution. You'll find it
  144. yourself using my indications (see the crack of the Wincat Pro
  145. program below).
  146.  
  147. WHERE ARE THE CODES? WHERE ARE THE MODIFIED FILES? WHERE DO THE
  148. PROTECTIONS KEEP COUNT OF THE PASSING DAYS?
  149. Most of the time the protection schemes use their own *.ini files
  150. in the c:\WINDOWS directory for registration purposes... at time
  151. they even use the "garbage sammler" win.ini file. Let's take as
  152. example WINZIP (versions 5 and 5.5), a very widespread program,
  153. you'll surely have one shareware copy of it somewhere between
  154. your files.
  155.   In theory, winzip should be registered per post, in order to
  156. get a "NEW" copy of it, a "registered" copy.
  157.   This scares most newby crackers, since if the copy you have
  158. it's not full, there is no way to crack it and make it work,
  159. unless you get the REAL stuff. The youngest among us do not
  160. realize that the production of a real "downsized" demo copy is
  161. a very expensive nightmare for the money-infatuated commercial
  162. programmers, and that therefore almost nobody does it really...
  163. nearly all "demos" and "trywares" are therefore CRIPPLED COMPLETE
  164. PROGRAMS, and not "downsized" demos, independently of what the
  165. programmers and the protectionists have written inside them.
  166.   Back to Winzip... all you need, to crack winzip, is to add a
  167. few lines inside the win.ini file, under the heading [WinZip],
  168. that has already been created with the demo version, before the
  169. line with "version=5.0".
  170.  I will not help you any further with this... I'll leave it to
  171. you to experiment with the correct sequences... inside win.ini
  172. you must have following sequence (these are only template to
  173. substitute for your tries inside WINICE... you'll get it, believe
  174. me):
  175.    [WinZip]
  176.    name=Azert Qwerty
  177.    sn=########
  178.    version=5.5
  179.  
  180.   The *important* thing is that this means that you DO NOT NEED
  181. to have a "new registered version" shipped to you in order to
  182. make it work, as the protectionist sellers would like you to
  183. believe. The same applies most of the time... never believe what
  184. you read in the read.me or in the registration files...
  185.   This brings me to a broader question: NEVER believe the
  186. information they give you... never believe what television and/or
  187. newspapers tell you... you can be sure that the only reason they
  188. are notifying you something is to hinder you to read or
  189. understand something else... this stupid_slaves_society can only
  190. subsist if nobody thinks... if you are really interested in what
  191. is going on, real information can be gathered, but surely not
  192. through the "conventional" newspapers and/or news_agencies (and
  193. definitely NEVER through television, that's really only for the
  194. stupid slaves)... yes, some bit of information can be
  195. (laboriously) gathered... it's a cracking work, though.
  196.  
  197. HOW TO CRACK INFORMATION [WHERE WHAT]
  198. *    INTERNET
  199.   In the middle of the hugest junk collection of the planet, some
  200. real information can be laboriously gathered if you do learn how
  201. to use well the search engines (or if you do build your ones...
  202. my spiders are doing most of the work for me... get your robots
  203. templates from "Harvest" or "Verify" and start your "spider
  204. building" activity beginning from Martijn Koster's page). As
  205. usual in our society, in the Internet the real point is exactly
  206. the same point you'll have to confront all your life long: HOW
  207. TO THROW AWAY TONS OF JUNK, HOW TO SECLUDE MYRIADS OF USELESS
  208. INFORMATION and HOW TO FISH RARE USEFUL INFORMATION, a very
  209. difficult art to learn per se. Internet offers some information,
  210. though, mainly BECAUSE it's (still) unregulated. You want a
  211. proof? You are reading it.
  212.  
  213. *    SOME (RARE) NEWSPAPERS.
  214.   The newspaper of the real enemies, the economic powers that
  215. rule this slaves world, are paradoxically most of the time the
  216. only ones worth studying... somewhere even the real rulers have
  217. to pass each other some bits of real information. The "Neue
  218. Zuercher Zeitung", a newspaper of the Swiss industrials from
  219. Zuerich, is possibly the best "not_conformist trend analyzer"
  220. around that you can easily find (even on the web). These
  221. swissuckers do not give a shit for ideology, nor preconcerted
  222. petty ideas, the only thing they really want is to sell
  223. everywhere their ubiquitous watches and their chocolates... in
  224. order to do it, a land like Switzerland, with very high salaries
  225. and a good (and expensive) social system, must use something
  226. brilliant... they found it: a clear vision of the world... as a
  227. consequence this newspaper is very often "against" the trend of
  228. all the other medias in the world, the ones that are used only
  229. in order to tame the slaves... If the only language you know is
  230. english (poor guy) you could try your luck with the weekly
  231. "Economist"... you'll have to work a lot with it, coz it has been
  232. tailored for the "new riches" of the Tatcher disaster, but you
  233. can (at times) fish something out of it... they do a lot of
  234. idiotic propaganda, but are nevertheless compelled to write some
  235. truth. American newspapers (at least the ones you can get here
  236. in Europe) are absolute shit... one wonders where the hell do the
  237. americans hyde the real information.
  238.   On the "non-capitalistic" side of information there is a
  239. spanish newspaper "El Pais" that seems to know about what's going
  240. on in South America, but it's so full of useless propaganda about
  241. irrelevant Spanish politics that it's not really worth reading.
  242. The monthly "Le Monde diplomatique" offers something too... this
  243. one exaggerates a little on the pauperistic "third world" side,
  244. but has a lot of useful information. See what you can do with all
  245. this information (or disinformation?)
  246.  
  247. [BELIEVE THE COUNTRARY]
  248.      Another good rule of thumb in choosing your medias is the
  249. following... if all medias around you assure, for instance, that
  250. "the Serbians are evil"... the only logical consequence is that
  251. the Serbians are not so evil at all and that "the Croats" or some
  252. other Yugoslavian shits are the real culprits. This does not mean
  253. at all that the Serbians are good, I warn you, it means only what
  254. I say: something is surely hidden behind the concerted propaganda
  255. you hear, the best reaction is to exaggerate in the other
  256. direction and believe the few bit of information that do say the
  257. countrary of the trend. This rule of thumb may be puerile, but
  258. it works somehow most of the time... if somewhere everybody
  259. writes that the commies are bad then THERE the commies must not
  260. be so bad at all and, conversely, if everybody in another place
  261. writes that the commies are all good and nice and perfect (like
  262. the Soviet propaganda did) then THERE the commies are surely not
  263. so good... it's a matter of perspective, much depends on where
  264. you are, i.e. whose interests are really at stake. There is NEVER
  265. real information in this society, only propaganda... if you still
  266. do not believe me do yourself a little experiment... just read
  267. the media description of a past event (say the Vietnam war) as
  268. written AT THE MOMENT of the event and (say) as described 10
  269. years later. You'll quickly realize how untrustworthy all
  270. newspapers and medias are.
  271.  
  272. *    SEMIOTICS You'll have to study it (as soon as you can) to
  273. interpret what they let you believe, in order to get your
  274. bearings. A passing knowledge of ancient RHETORIC can help quite
  275. a lot. Rhetoric is the "Softice" debugger you need to read
  276. through the propaganda medias: concentrate on Periphrasis,
  277. Synecdoche, Antonomasia, Emphasis, Litotes and Hyperbole at the
  278. beginning... you'll later crack higher with Annominatio,
  279. Polyptoton, Isocolon and all the other lovely "figurae
  280. sententiae".
  281.  
  282. Enough, back to software cracking.
  283.  
  284. HOW A REGISTRATION CODE WORKS [WINCAT]
  285.      Let's take as an example for the next crack, a Username-
  286. algebraic registration code, WINCAT Pro, version 3.4., a 1994
  287. shareware program by Mart Heubel. It's a good program, pretty
  288. useful to catalogue the millions of files that you have on all
  289. your cd-roms (and to find them when you need them).
  290. The kind of protection Wincat Pro uses is the most utilized
  291. around: the username string is manipulated with particular
  292. algorithms, and the registration key will be made "ad hoc" and
  293. depends on the name_string. It's a protection incredibly easy to
  294. crack when you learn how the relevant procedures work.
  295.      [WINCAT Pro] is a good choice for cracking studies, coz you
  296. can register "over your registration" one thousand times, and you
  297. can herefore try for this crack different user_names to see all
  298. the algebrical correspondences you may need to understand the
  299. protection code.
  300.      In this program, when you select the option "register", you
  301. get a window where you can input your name and your registration
  302. number (that's what you would get, emailed, after registering
  303. your copy). If you load winice and do your routinely hwnd to
  304. individuate the nag window, and then breakpoint on the
  305. appropriate memory ranges you'll peep in the working of the whole
  306. bazaar (this is completely useless in order to crack these
  307. schemes, but it'll teach you a lot for higher cracking, so you
  308. better do it also with two or three other programs, even if it
  309. is a little boring): a series of routines act on the input (the
  310. name) of the user: the User_name_string (usn). First of all the
  311. usn_length will be calculated (with a REPNZ SCASB and a following
  312. STOSB). Then various routines store and move in memory the usn
  313. and the registration_number (rn) and their relative lengths. In
  314. order to compare their lengths and to check the correct
  315. alphanumeric correspondence between usn and rn, the program first
  316. uppercases the usn and strips all eventual spaces away.
  317.      Here the relevant code (when you see an instruction like
  318. SUB  AL,20 you should immediately realize that you are in a
  319. uppercasing routine, which is important for us, since these are
  320. mostly used for password comparisons)... here the relevant Winice
  321. unassemble and my comments:
  322. 253F:00000260  AC        LODSB          <- get the usn chars
  323. 253F:00000261  08C0      OR   AL,AL     <- check if zero
  324. 253F:00000263  740F      JZ   0274      <- 0: so usn finished
  325. 253F:00000265  3C61      CMP  AL,61     <- x61 is "a", man
  326. 253F:00000267  72F7      JB   0260      <- not a lower, so loop
  327. 253F:00000269  3C7A      CMP  AL,7A     <- x7A is "z", what else?
  328. 253F:0000026B  77F3      JA   0260      <- not a lower, so loop
  329. 253F:0000026D  2C20      SUB  AL,20     <- upper it if it's lower
  330. 253F:0000026F  8844FF    MOV  [SI-01],AL<- and hyde it away
  331. 253F:00000272  EBEC      JMP  0260      <- loop to next char
  332. 253F:00000274  93        XCHG AX,BX
  333. ...
  334. The instruction  MOV [SI-01],AL that you see here is important
  335. at times, coz it points to the location of the "pre-digested"
  336. usn, i.e. the usn formatted as it should be for the number
  337. comparison that will happen later. In some more complicated
  338. protection schemes the reasoning behind this formatting is the
  339. following: "Stupid cracker will never get the relation algorhitm
  340. usn <-> rn, coz he does not know that usn AND rn are slightly
  341. changed before comparing, ah ah... no direct guessing is
  342. possible". Here is only "polishing": you have to "polish" a
  343. string before comparing it in order to concede some mistakes to
  344. the legitimate user (too many spaces in the name, upper-lower
  345. case mismatch, foreign accents in the name etc.) You just need
  346. to know, for now, that this checking is usually still 5 or 6
  347. calls ahead of the real checking (it's what we call a "green
  348. light").
  349.      You should in general realize that the real checking of the
  350. algebrical correspondence follows after a whole series of memory
  351. operations, i.e.: cancelling (and erasing) the previous (if ever)
  352. attempts; reduplicating the usn and the rn somewhere else in
  353. memory; double checking the string lengths (and saving all these
  354. values somewhere... be particularly attentive when you meet stack
  355. pointers (for instance [BP+05]): most of the programs you'll find
  356. have been written in C (what else?). C uses the stack (SS:SP) to
  357. pass parameters or to create local variables for his procedures.
  358. The passwords, in particular, are most of the time compared to
  359. data contained within the stack. If inside a protection a BP
  360. register points to the stack you have most of the time fished
  361. something... remember it pupils: it will spare you hours of
  362. useless cracking inside irrelevant routines. Back to our CATWIN:
  363. another little check is about the "minimal" length allowed for
  364. a user name, in our babe, for instance, the usn must have at
  365. least 6 chars:
  366.      230F:00003483  3D0600    CMP  AX,0006
  367.      230F:00003486  730F      JAE  3497      <- go to nice_name
  368. :too_short
  369.      230F:00003488  BF9245    MOV  DI,4592   <- no good: short
  370.   After a lot of other winicing you'll finally come across
  371. following section of the code:
  372. 2467:00000CA3  B90100    MOV  CX,0001
  373. 2467:00000CA6  03F1      ADD  SI,CX
  374. 2467:00000CA8  2BC1      SUB  AX,CX
  375. 2467:00000CAA  7213      JB   0CBF
  376. 2467:00000CAC  40        INC  AX
  377. 2467:00000CAD  368B4F04  MOV  CX,SS:[BX+04]  <- here
  378. 2467:00000CB1  0BC9      0R   CX,CX
  379. 2467:00000CB3  7D02      JGE  0CB7
  380. 2467:00000CB5  33C9      XOR  CX,CX
  381. 2467:00000CB7  3BC1      CMP  AX,CX
  382. 2467:00000CB9  7606      JBE  0CC1
  383. 2467:00000CBB  8BC1      MOV  AX,CX
  384. 2467:00000CBD  EB02      JMP  0CC1
  385. 2467:00000CBF  33C0      XOR  AX,AX
  386. 2467:00000CC1  AA        STOSB               <- and here
  387. 2467:00000CC2  8BC8      MOV  CX,AX
  388. 2467:00000CC4  F3A4      REPZ MOVSB          <- and here!
  389. 2467:00000CC6  8EDA      MOV  DS,DX
  390. 2467:00000CC8  FC        RETF 0008
  391.  
  392.      This is obviously the last part of the checking routine
  393. (I'll not delve here with the mathematical tampering of it, if
  394. you want to check its workings, by all means, go ahead, it's
  395. quite interesting, albeit such study is NOT necessary to crack
  396. these schemes). The important lines are obviously the MOV
  397. CX,SS:[BX+04], the STOSB and the REPZ MOVSB (as usual in password
  398. protection schemes, you do remember lesson 3, don't you?).
  399.      You should be enough crack-able :=) by now (if you have read
  400. all the precedent lessons of my tutorial), to find out easily,
  401. with these hints, how the working of the protection goes and
  402. where dwells in memory the ECHO of the correct rn (passkey) that
  403. matches the name you typed in. Remember that in these kind of
  404. cracks the ECHO is present somewhere (90% of the cases). There
  405. are obviously one thousand way to find such ECHOs directly,
  406. without going through the verificayions routines... for instance
  407. you could also find them with a couple of well placed
  408. snap_compares, it's a "5 minutes" cracking, once you get the
  409. working of it. I leave you to find, as interesting exercise, the
  410. routine that checks for a "-" inside the rn, a very common
  411. protection element.
  412.   In order to help you understand the working of the protection
  413. code in [Wincat Pro] I'll give you another hint, though: if you
  414. type "+ORC+ORC+ORC" as usn, you'll have to type 38108-37864 as
  415. rn, if you usn as usn "+ORC+ORC" then the relative rn will be
  416. 14055-87593. But these are my personal cracks... I have offered
  417. this information only to let you better explore the mathematical
  418. tampering of this specific program... you'll better see the
  419. snapping mechanism trying them out (going through the routines
  420. inside Winice) alternatively with a correct and with a false
  421. password. Do not crack Wincat with my combination! If you use a
  422. different usn than your own name to crack a program you only show
  423. that you are a miserable lamer... no better than the lamers that
  424. believe to "crack" software using huge lists of serial numbers...
  425. that is really software that they have stolen (Yeah: stolen, not
  426. cracked). You should crack your programs, not steal them...
  427. "Warez_kids" and "serial#_aficionados" are only useless zombies.
  428. I bomb them as soon as I spot them. YOU ARE (gonna be) A CRACKER!
  429. It makes a lot of a difference, believe me.
  430.  
  431. Well, that's it for this lesson, reader. Not all lessons of my
  432. tutorial are on the Web.
  433.      You 'll obtain the missing lessons IF AND ONLY IF you mail
  434. me back (via anon.penet.fi) with some tricks of the trade I may
  435. not know that YOU discovered. Mostly I'll actually know them
  436. already, but if they are really new you'll be given full credit,
  437. and even if they are not, should I judge that you "rediscovered"
  438. them with your work, or that you actually did good work on them,
  439. I'll send you the remaining lessons nevertheless. Your
  440. suggestions and critics on the whole crap I wrote are also
  441. welcomed.
  442.  
  443.      "If you give a man a crack he'll be hungry again
  444.      tomorrow, but if you teach him how to crack, he'll
  445.      never be hungry again"
  446.  
  447. an526164@anon.penet.fi 
  448.  
  449.